import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_scence_safe_third_work_entity.dart';

StandardScenceSafeThirdWorkEntity $StandardScenceSafeThirdWorkEntityFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeThirdWorkEntity standardScenceSafeThirdWorkEntity = StandardScenceSafeThirdWorkEntity();
  final List<StandardScenceSafeThirdWorkAmendmentList>? amendmentList = (json['amendmentList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<StandardScenceSafeThirdWorkAmendmentList>(e) as StandardScenceSafeThirdWorkAmendmentList).toList();
  if (amendmentList != null) {
    standardScenceSafeThirdWorkEntity.amendmentList = amendmentList;
  }
  final String? checkDate = jsonConvert.convert<String>(json['checkDate']);
  if (checkDate != null) {
    standardScenceSafeThirdWorkEntity.checkDate = checkDate;
  }
  final String? checkPerson = jsonConvert.convert<String>(json['checkPerson']);
  if (checkPerson != null) {
    standardScenceSafeThirdWorkEntity.checkPerson = checkPerson;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeThirdWorkEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeThirdWorkEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeThirdWorkEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeThirdWorkEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeThirdWorkEntity.deleted = deleted;
  }
  final String? fileAddressUrl = jsonConvert.convert<String>(json['fileAddressUrl']);
  if (fileAddressUrl != null) {
    standardScenceSafeThirdWorkEntity.fileAddressUrl = fileAddressUrl;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeThirdWorkEntity.id = id;
  }
  final String? phone = jsonConvert.convert<String>(json['phone']);
  if (phone != null) {
    standardScenceSafeThirdWorkEntity.phone = phone;
  }
  final String? thirdPartName = jsonConvert.convert<String>(json['thirdPartName']);
  if (thirdPartName != null) {
    standardScenceSafeThirdWorkEntity.thirdPartName = thirdPartName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeThirdWorkEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeThirdWorkEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeThirdWorkEntity.updateDate = updateDate;
  }
  final String? workAreaPerson = jsonConvert.convert<String>(json['workAreaPerson']);
  if (workAreaPerson != null) {
    standardScenceSafeThirdWorkEntity.workAreaPerson = workAreaPerson;
  }
  final String? workPoint = jsonConvert.convert<String>(json['workPoint']);
  if (workPoint != null) {
    standardScenceSafeThirdWorkEntity.workPoint = workPoint;
  }
  final String? workTimeBegin = jsonConvert.convert<String>(json['workTimeBegin']);
  if (workTimeBegin != null) {
    standardScenceSafeThirdWorkEntity.workTimeBegin = workTimeBegin;
  }
  final String? workTimeEnd = jsonConvert.convert<String>(json['workTimeEnd']);
  if (workTimeEnd != null) {
    standardScenceSafeThirdWorkEntity.workTimeEnd = workTimeEnd;
  }
  return standardScenceSafeThirdWorkEntity;
}

Map<String, dynamic> $StandardScenceSafeThirdWorkEntityToJson(StandardScenceSafeThirdWorkEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['amendmentList'] = entity.amendmentList?.map((v) => v.toJson()).toList();
  data['checkDate'] = entity.checkDate;
  data['checkPerson'] = entity.checkPerson;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['fileAddressUrl'] = entity.fileAddressUrl;
  data['id'] = entity.id;
  data['phone'] = entity.phone;
  data['thirdPartName'] = entity.thirdPartName;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['workAreaPerson'] = entity.workAreaPerson;
  data['workPoint'] = entity.workPoint;
  data['workTimeBegin'] = entity.workTimeBegin;
  data['workTimeEnd'] = entity.workTimeEnd;
  return data;
}

extension StandardScenceSafeThirdWorkEntityExtension on StandardScenceSafeThirdWorkEntity {
  StandardScenceSafeThirdWorkEntity copyWith({
    List<StandardScenceSafeThirdWorkAmendmentList>? amendmentList,
    String? checkDate,
    String? checkPerson,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? fileAddressUrl,
    String? id,
    String? phone,
    String? thirdPartName,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? workAreaPerson,
    String? workPoint,
    String? workTimeBegin,
    String? workTimeEnd,
  }) {
    return StandardScenceSafeThirdWorkEntity()
      ..amendmentList = amendmentList ?? this.amendmentList
      ..checkDate = checkDate ?? this.checkDate
      ..checkPerson = checkPerson ?? this.checkPerson
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..fileAddressUrl = fileAddressUrl ?? this.fileAddressUrl
      ..id = id ?? this.id
      ..phone = phone ?? this.phone
      ..thirdPartName = thirdPartName ?? this.thirdPartName
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..workAreaPerson = workAreaPerson ?? this.workAreaPerson
      ..workPoint = workPoint ?? this.workPoint
      ..workTimeBegin = workTimeBegin ?? this.workTimeBegin
      ..workTimeEnd = workTimeEnd ?? this.workTimeEnd;
  }
}

StandardScenceSafeThirdWorkAmendmentList $StandardScenceSafeThirdWorkAmendmentListFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeThirdWorkAmendmentList standardScenceSafeThirdWorkAmendmentList = StandardScenceSafeThirdWorkAmendmentList();
  final String? amendmentDate = jsonConvert.convert<String>(json['amendmentDate']);
  if (amendmentDate != null) {
    standardScenceSafeThirdWorkAmendmentList.amendmentDate = amendmentDate;
  }
  final String? amendmentUser = jsonConvert.convert<String>(json['amendmentUser']);
  if (amendmentUser != null) {
    standardScenceSafeThirdWorkAmendmentList.amendmentUser = amendmentUser;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeThirdWorkAmendmentList.companyCode = companyCode;
  }
  final String? correlationId = jsonConvert.convert<String>(json['correlationId']);
  if (correlationId != null) {
    standardScenceSafeThirdWorkAmendmentList.correlationId = correlationId;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeThirdWorkAmendmentList.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeThirdWorkAmendmentList.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeThirdWorkAmendmentList.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeThirdWorkAmendmentList.deleted = deleted;
  }
  final String? fileAddressUrl = jsonConvert.convert<String>(json['fileAddressUrl']);
  if (fileAddressUrl != null) {
    standardScenceSafeThirdWorkAmendmentList.fileAddressUrl = fileAddressUrl;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeThirdWorkAmendmentList.id = id;
  }
  final String? sort = jsonConvert.convert<String>(json['sort']);
  if (sort != null) {
    standardScenceSafeThirdWorkAmendmentList.sort = sort;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeThirdWorkAmendmentList.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeThirdWorkAmendmentList.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeThirdWorkAmendmentList.updateDate = updateDate;
  }
  return standardScenceSafeThirdWorkAmendmentList;
}

Map<String, dynamic> $StandardScenceSafeThirdWorkAmendmentListToJson(StandardScenceSafeThirdWorkAmendmentList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['amendmentDate'] = entity.amendmentDate;
  data['amendmentUser'] = entity.amendmentUser;
  data['companyCode'] = entity.companyCode;
  data['correlationId'] = entity.correlationId;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['fileAddressUrl'] = entity.fileAddressUrl;
  data['id'] = entity.id;
  data['sort'] = entity.sort;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension StandardScenceSafeThirdWorkAmendmentListExtension on StandardScenceSafeThirdWorkAmendmentList {
  StandardScenceSafeThirdWorkAmendmentList copyWith({
    String? amendmentDate,
    String? amendmentUser,
    String? companyCode,
    String? correlationId,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? fileAddressUrl,
    String? id,
    String? sort,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return StandardScenceSafeThirdWorkAmendmentList()
      ..amendmentDate = amendmentDate ?? this.amendmentDate
      ..amendmentUser = amendmentUser ?? this.amendmentUser
      ..companyCode = companyCode ?? this.companyCode
      ..correlationId = correlationId ?? this.correlationId
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..fileAddressUrl = fileAddressUrl ?? this.fileAddressUrl
      ..id = id ?? this.id
      ..sort = sort ?? this.sort
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
